﻿using System.Web.UI;

namespace TPG.SharePoint.Workflow
{
    //public abstract class WorkflowFormControl
    //    : WorkflowControl
    //{
    //    #region [===== Sample Class =====]
    //    //class SampleUntyped
    //    //    : AssociationFormControl
    //    //{
    //    //    protected override void OnLoad(EventArgs e)
    //    //    {
    //    //        if (Host.IsNewAssocation == false &&
    //    //            Host.IsInitialLoad)
    //    //        {
    //    //            string data = GetAssociationData();
    //    //        }
    //    //        base.OnLoad(e);
    //    //    }

    //    //    protected internal override string SaveAssociationData()
    //    //    {
    //    //        return "Data";
    //    //    }
    //    //}
    //    #endregion

    //    internal static WorkflowFormControl CreateFormControl(Page page, string formUrl)
    //    {
    //        WorkflowControl control = WorkflowControl.CreateFormControl(page, formUrl);
    //        if (control == null)
    //            throw new WorkflowException("No form registered.");

    //        WorkflowFormControl formControl = control as WorkflowFormControl;
    //        if (formControl == null)
    //            throw new WorkflowException("Control does not derive from WorkflowFormControl");

    //        return formControl;
    //    }       
    //}
}
